/**
 * @namespace dd.list
*/
dd.list.extend({
    items:[],
    init:function(){},
    func:function(){},
    /**
     * @function
     *  map description.
     *  @param func {function} description.
     *  @param items {array} description.
     *  @returns {array} description.
    */
    map:function(func, items)
    {
        for(var i in items)
            items[i] = func(items[i]);
        return items;
    },
    /**
     * @function
     *  fold description.
     *  @param func {function} description.
     *  @param items {array} description.
     *  @param id {string} description.
     *  @returns {array} description.
    */
    fold:function(func, items, id)
    {
        var newItems = id;
        for(var i in items)
            newItems = func(items[i], newItems);
        return newItems;
    }
});